<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport"
        content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible"
        content="ie=edge">
  <title>angular可以在html中包含html</title>
  <script src="../lib/angular.1.7.8.js"></script>
</head>

<body>
  <div ng-app="myApp"
       ng-controller="myCtrl">
    <!-- 注意引入文件名是字符串， ng-*指令识别的是 变量 -->
    <div ng-include="'site.html'"></div>
  </div>
  <script>
    var app = angular.module('myApp', [])
    app.controller('myCtrl', ($scope, $http) => {
      $http.get('test.json').then(resp => {
      console.log("TCL: resp", resp)
        $scope.sites = resp.data.records
        console.log($scope.sites)
      })
    })

  </script>
</body>

</html>
